//
//  ViewController.m
//  YCCamera
//
//  Created by YC on 2017/7/18.
//  Copyright © 2017年 YC. All rights reserved.
//

#import "ViewController.h"
#import "YCCameraViewController.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
}

- (IBAction)clickOpen:(UIButton *)sender {
    YCCameraViewController *vc = [[YCCameraViewController alloc] init];
    
    __weak __typeof(&*self)weakSelf = self;
    vc.imageBlock = ^(UIImage *image) {
        weakSelf.imageView.image = image;
    };
    
    [self presentViewController:vc animated:true completion:nil];
}



@end
